<template>
  <view class="list-container">
    <view v-for="(record, index) in records" :key="record.id" class="record-item">
      <Items :record="record" @edit="$emit('edit', record.id)" @delete="$emit('delete', record.id)" />
    </view>
  </view>
</template>

<script setup lang="ts">
import Items from './items.vue'

const emit = defineEmits(['edit', 'delete'])

defineProps({
  records: {
    type: Array,
    default: () => []
  }
})
</script>